package com.bw.lib_router.provider

import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.bw.lib_base.path.RouterPath
import com.tencent.mmkv.MMKV

/**
 * 提供服务接口的具体实现类
 */

@Route(path = RouterPath.PATH_PROVIDER_SERVICE)
class RouterProviderImpl :IRouterProvider{

    private lateinit var mContext:Context

    override fun init(context: Context?) {
        if (context!=null){
            mContext=context
        }
    }

    override fun getLoginToken(): String {
        val token = MMKV.defaultMMKV().decodeString("token")
        return token?:""
    }

    override fun getAccessId(): String {
        val accessId = MMKV.defaultMMKV().decodeString("accessId")
        return accessId?:""
    }


}